<?php
// This file is the main index file which the user meets when they first enter the site.

// Include some function files and the config file.
include ('./config.php');
include ($rootpath . '/includes/functions' . $phpextension);
include ($rootpath . '/includes/sqlfunctions' . $phpextension);
include ($rootpath . '/includes/html_gen' . $phpextension);
include ($rootpath . '/includes/sqlvariables' . $phpextension);

print make_head($htmlversion, $sitename);

global $sqlconnection;

print "Testing PHP Persistent Universe early development files.<br/>";

print "Attempting to connect to relational database management system (MySQL)...<br/>";
mysqlconnect($dbhost, $dbport, $dbusername, $dbpassword);

// Find out whether the site is up or down for maintenance.
$sitestatus = getsitestatus ();

// Take action depending on the status returned by the database engine.
if ($sitestatus == true)
{
	print "Site is online";
}
else if ($sitestatus == false)
{
	print "Site is offline";
}

mysqldisconnect ();

print make_html_foot ();

?>

